package com.example.mysqladmin.util;

import org.apache.commons.lang3.StringUtils;

public class SqlUtils {
    
    public static String sanitizeSql(String sql) {
        if (StringUtils.isBlank(sql)) {
            throw new IllegalArgumentException("SQL语句不能为空");
        }
        return sql.trim();
    }

    public static boolean isSelectQuery(String sql) {
        return sql.toLowerCase().trim().startsWith("select");
    }
} 